import Vue from "vue";
import { Input, Select, DatePicker } from "ant-design-vue";
const { RangePicker } = DatePicker;
const renderComponent = {
  Input,
  Select,
  RangePicker,
};

export default (component) => {
  if (typeof component === "object") {
    const { name } = component;
    if (renderComponent[name]) {
      return Vue.component(renderComponent[name].name, renderComponent[name]);
    }
  }
  return false;
};
